#!
my %fruit = ('apple' => 3, 'pear' => 5,'orange' => 2);
foreach $fruit (keys %fruit)
{
    print "$fruit => $fruit{$fruit}\n";
}
@prices = values %fruit;
print join("\t",@prices),"\n";
# sort by keys
print "$_=>$fruit{$_}\n" foreach sort keys %fruit;
#sort by values
foreach(sort{$fruit{$b} <=> $fruit{$a}} keys %fruit)
{
    print "$_=>$fruit{$_}\n"
}
